<%--
    Document   : sun
    Created on : Jun 4, 2010, 8:09:44 PM
    Author     : sunil
--%>
<%@taglib tagdir="/WEB-INF/tags/hunk" prefix="hunk" %>
<%@taglib uri="/WEB-INF/tld/c.tld" prefix="c"%>
<%@taglib uri="/WEB-INF/tld/struts-html.tld" prefix="html"%>
<%@attribute name="href" required="true"%>
<%@attribute name="styleClass"%>
<%@attribute name="tooltip"%>
<%@attribute name="title"%>
<%@attribute name="tooltipClass"%>

<c:choose>
    <c:when test="${empty tooltip}">
        <html:link href="${href}" styleClass="${styleClass}" title="${title}">
            <jsp:doBody/>
        </html:link>
    </c:when>
    <c:otherwise>
        <html:link href="${href}" styleClass="${styleClass} ${tooltipClass}"  title="${title}">
            <jsp:doBody/>
        </html:link>
    </c:otherwise>
</c:choose>

<c:if test="${not empty tooltip}">
    <hunk:tooltip  tooltip="${tooltip}"  styleClass="${tooltipClass}"/>
</c:if>